package me.jiatao.paging3.room

import androidx.paging.PagingSource
import androidx.room.*

@Dao
interface ArticleDao {
    @Query("SELECT * FROM article_entity")
    fun loadAllByIds(): PagingSource<Int, ArticleEntity>


    @Insert(onConflict = OnConflictStrategy.REPLACE)
    //可设置插入模式
    suspend fun insertAll(users: List<ArticleEntity>)

    @Query("delete from article_entity")
    //可设置插入模式
    suspend fun deleteAll()
}